Expand description

About

odbc-api enables you to write applications which utilize ODBC (Open Database Connectivity) standard to access databases. See the guide for more information and code examples.

Re-exports

pub use self::parameter::InOut;
pub use self::parameter::Out;
pub use self::parameter::OutputParameter;
pub use self::parameter::ParameterRef;
pub use odbc_sys as sys;

Modules

This module contains buffers intended to be bound to ODBC statement handles.

Introduction to odbc-api (documentation only)

Provides basic abstraction over valid (i.e. allocated ODBC handles).

Passing parameters to statement

Structs

New type wrapping u8 and binding as SQL_BIT.

Describes the type and attributes of a column.

The connection handle references storage of all information about the connection to the data source, including status, transaction state, and error information.

Cursors are used to process and iterate the result sets returned by executing queries. Created by either a prepared query or direct execution. Usually utilized through the crate::Cursor trait.

An individual row of an result set. See crate::Cursor::next_row.

Holds name and description of a datasource

Struct holding information available on a driver. Can be obtained via Environment::drivers.

An ODBC 3.8 environment.

Wraps a type T together with an additional indicator. This way the type gains a Null representation, those memory layout is compatible with ODBC.

A preallocated SQL statement handle intended for sequential execution of different queries. See crate::Connection::preallocate.

A prepared statement with prebound parameters.

A prepared query. Prepared queries are useful if the similar queries should executed more than once.

A row set cursor iterates in blocks over row sets, filling them in buffers, instead of iterating the result set row by row. This is usually much faster.

Statement handle which also takes ownership of Connection

Enums

Enumeration over valid SQL Data Types supported by ODBC

Specifies how the driver and driver manager complete the incoming connection string. See crate::Environment::driver_connect.

Error type used to indicate a low level ODBC call returned with SQL_ERROR.

Indication of whether a column is nullable or not.

Traits

Cursors are used to process and iterate the result sets returned by executing queries.

An instance can be consumed and to create a parameter which can be bound to a statement during execution.

SQL Parameters used to execute a query.

Provides Metadata of the resulting the result set. Implemented by Cursor types and prepared queries. Fetching metadata from a prepared query might be expensive (driver dependent), so your application should fetch the Metadata it requires from the Cursor if possible.

A Row set buffer binds row, or column wise buffers to a cursor in order to fill them with row sets with each call to fetch.

Functions

You can use this method to escape a password so it is suitable to be appended to an ODBC connection string as the value for the PWD attribute. This method is only of interest for application in need to create their own connection strings.

Type Definitions

String slice reference for U16String.

An owned, mutable “wide” string for FFI that is not nul-aware.